package com.neusoft.elmboot.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.elmboot.mapper.BusinessMapper;
import com.neusoft.elmboot.po.Business;
import com.neusoft.elmboot.po.Food;
import com.neusoft.elmboot.po.User;
import com.neusoft.elmboot.service.BusinessService;

@Service
public class BusinessServiceImpl implements BusinessService{

	@Autowired
	private BusinessMapper businessMapper;

	@Override
	public List<Business> listBusinessByOrderTypeId(Integer orderTypeId) {
		return businessMapper.listBusinessByOrderTypeId(orderTypeId);
	}

	@Override
	public Business getBusinessById(Integer businessId) {
		return businessMapper.getBusinessById(businessId);
	}
	
	@Override
	 public List<Business> searchBusiness(String keyword) {
	   return businessMapper.searchBusinessByKeyword(keyword);
	    }
	 

	@Override
	public Integer registerBusiness(Business business) {
		return businessMapper.registerBusiness(business);
	}

	@Override
	public Integer updateBusiness(Business business) {
		return businessMapper.updateBusiness(business);
	}

	@Override
	public Integer deleteBusiness(Integer businessId) {
		return businessMapper.deleteBusiness(businessId);
	}
	
	@Override
	public List<Business> getAllBusinesses() {
		return businessMapper.getAllBusinesses();
	}

	@Override
	public Business getUserBySIdByUId(Business business) {
		return businessMapper.getUserBySIdByUId(business);
	}

	@Override
	public Business getBusinessBySId(Integer sellerId) {
		return businessMapper.getBusinessBySId(sellerId);
	}

	
	}
